<!--
检测用户是否登录
-->
<template>
  <span class="mc-check-web-login" v-loading.fullscreen.lock="fullscreenLoading">检测WEB登录</span>
</template>

<script>
export default {
  name: 'mc-check-web-login',
  data () {
    return {
      fullscreenLoading:window.iframeUi?false:true
    }
  },
  created () {
    if(!window.iframeUi){
      this.checkLogin();
    }
  },
  methods:{
      checkLogin(){
          var request = this.$magicaltool.request;
          request.axios({$vue:this,url:'/magical_lowcode/web_user/check-login',method:'get',param: {}}).then(()=>{
            this.fullscreenLoading = false;
          });
      }
  }
}
</script>

<style lang="scss">
/*默认隐藏起来*/
.mc-check-web-login{
  display: none;
}
/*设计阶段显示*/
.magicalcoder-dragging .mc-check-web-login{
  display: inline-block;
  border: solid 1px #819e81;
}
</style>
